Fix 15435:ab95b9764b20.
authorIan Campbell <ian.campbell@xensource.com>
Mon, 2 Jul 2007 07:42:13 +0000 (08:42 +0100)
committerIan Campbell <ian.campbell@xensource.com>
Mon, 2 Jul 2007 07:42:13 +0000 (08:42 +0100)
The changeset did not consider about ":cdrom" and "ioemu:"
of a disk definition.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendConfig.py

index 16ebea6f097c1dc0190dfdbdb4e8e4ff23c9679a..17628f337a45bb36ea77201a8bbfcdb85db90f1b 100644 (file)
@@ -936,6 +936,13 @@ class XendConfig(dict):
         return sxpr    
     
     def _blkdev_name_to_number(self, dev):
+        if 'ioemu:' in dev:
+            _, dev = dev.split(':', 1)
+        try:
+            dev, _ = dev.split(':', 1)
+        except ValueError:
+            pass
+        
         try:
             devid = int(dev)
         except ValueError: